package com.deparse.dpframe.ui.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.deparse.dpframe.R;

/**
 * Created by hsy on 2016/1/6.
 */
public class DProgressDialog extends Dialog {
    private String message = "";
    TextView textView;

    public DProgressDialog(Context context, String message) {
        super(context, R.style.DP_Theme_ProgressDialog);
        this.message = message;
    }

    public DProgressDialog(Context context, int themeResId) {
        super(context, R.style.DP_Theme_ProgressDialog);
    }

    protected DProgressDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    private View contentView = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        contentView = getLayoutInflater().inflate(R.layout.dp_uck_pcenter_dialog_upload_progress, null);
        setContentView(contentView);

        textView = (TextView) contentView.findViewById(R.id.message);
        textView.setText(message);

        if (null == message || "".equals(message)) {
            textView.setVisibility(View.GONE);
        } else {
            textView.setVisibility(View.VISIBLE);
        }
    }
}
